package com.tech.demo;

import com.tech.impl.UserDaoImpl;
import com.tech.servcie.UserServcie;
import com.tech.servcie.impl.UserServiceImpl;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserController {
    public static void main(String[] args) {
        //调用 service 业务层面
        ClassPathXmlApplicationContext app = new ClassPathXmlApplicationContext("ApplicationContext.xml");
        UserServcie userService = (UserServcie) app.getBean("userService");
        userService.save();

//        UserServcie userServcie=new UserServiceImpl();
//        userServcie.save();
    }
}
